package com.jiepu.daily.corejava.advanceed.part8xml.dom4j;

import org.dom4j.Element;

import java.util.List;

/**
 * @Description:
 * @author: xinjie
 * @date: 2020/8/17  9:47
 */
public class Dom4jDemo2 {
	public static void main(String[] args) {

	} // main

	public static void print(Element element) {
		//	1.
		List<Element> elements = element.elements();

		if (elements.size() == 0) {
			System.out.println(element.getName() + ":" + element.getText());
		} else {
			System.out.println("["+element+"]");
			for (Element ele : elements
			) {
				print(ele);
			}
		}



	} // print()
}
